<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
	<title>听雨管理后台-登录</title>
	<link rel="shortcut icon" href="/static/admin/img/logo.jpg" type="image/x-icon">
	<link href="/static/admin/css/bootstrap.min.css" rel="stylesheet"/>
	<link href="/static/admin/css/font-awesome.min.css" rel="stylesheet"/>
	<link href="/static/admin/css/weather-icons.min.css" rel="stylesheet"/>
	<link id="beyond-link" href="/static/admin/css/beyond.min.css" rel="stylesheet" type="text/css"/>

</head>
<body>
<div class="login-container">
	<div class="loginbox bg-white">
		<form id="form">
			<div class="loginbox-title">注册</div>

			<div class="loginbox-or">
				<div class="or-line"></div>
			</div>
			<div class="loginbox-textbox">
				<input type="text" name="username" class="form-control" placeholder="用户名"/>
			</div>
			<div class="loginbox-textbox">
				<input type="password" name="password" class="form-control" placeholder="密码"/>
			</div>
			<div class="loginbox-textbox">
				<input type="password" name="re_password" class="form-control" placeholder="确认密码"/>
			</div>
			<div class="loginbox-textbox">
				<input type="text" name="nickname" class="form-control" placeholder="昵称"/>
			</div>
			<div class="loginbox-textbox">
				<input type="email" name="email" class="form-control" placeholder="邮箱"/>
			</div>
			<div class="loginbox-submit">
				<input type="submit" class="btn btn-primary btn-block" id="register" value="注册">
			</div>
			<div class="loginbox-signup">
				已有账户？<a href="{:url('admin/Index/login')}" style="color: #1E9FFF">&nbsp; 去登录</a>
			</div>
		</form>
	</div>

</div>

<script src="/static/admin/js/skins.min.js"></script>

<!--Basic Scripts-->
<script src="/static/admin/js/jquery.min.js"></script>
<script src="/static/admin/js/bootstrap.min.js"></script>
<script src="/static/admin/js/slimscroll/jquery.slimscroll.min.js"></script>
<!--Beyond Scripts-->
<script src="/static/admin/js/beyond.js"></script>
<!-- layer -->
<script src="/static/lib/layer/layer.js"></script>
<script>
	$(window).bind("load", function () {

		/*Sets Themed Colors Based on Themes*/
		themeprimary = getThemeColorFromCss('themeprimary');
		themesecondary = getThemeColorFromCss('themesecondary');
		themethirdcolor = getThemeColorFromCss('themethirdcolor');
		themefourthcolor = getThemeColorFromCss('themefourthcolor');
		themefifthcolor = getThemeColorFromCss('themefifthcolor');

	});


	$("#register").click(function () {
		$.ajax({
			url: "",
			type: "post",
			data: $("#form").serialize(),
			dataType: 'json',
			success: function (data) {
				if (data.code == 1){
					layer.msg(data.msg, {
						icon: 6,
						time: 500
					}, function () {
						location.href = data.url;
					});
				}else {
					layer.open({
						title: '注册失败',
						content: data.msg,
						icon: 5,
						anim: 6
					});
				}
			}

		})
		return false;
	});
</script>
</body>
<!--  /Body -->
</html>
